<legend class='hyc-legend'>
    <i class="fa fa-list"></i>&nbsp;
    <span>运单管理</span>
</legend>
<div class="panel panel-default">
    <div class="panel-heading">运单列表</div>
    <div class="panel-body">
        <div class="row">
            <div class="col-md-1 text-right top7">起运地</div>
            <div class="col-md-5">
                <div class="row">
                    <div class="col-md-4">
                        <div class="form-group">
                            <button type="button" class="btn btn-default admin-select select hyc-width" ng-change="loadDepartCity()" ng-model="waybillInfo.departProvinceCode" bs-options="p.code as p.name for p in loadProvince" bs-select placeholder="---请选择---">
                            </button>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="form-group">
                            <button type="button" class="btn btn-default admin-select select hyc-width" ng-change="loadDepartCounty()" ng-model="waybillInfo.departCityCode" bs-options="cityDate.code as cityDate.name for cityDate in departCity" bs-select placeholder="---请选择---">
                            </button>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="form-group">
                            <button type="button" class="btn btn-default admin-select select hyc-width" ng-model="waybillInfo.departCountyCode" bs-options="countyDate.code as countyDate.name for countyDate in departCounty" bs-select placeholder="---请选择---">
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-1 text-right top7">目的地</div>
            <div class="col-md-5">
                <div class="row">
                    <div class="col-md-4">
                        <div class="form-group">
                            <button type="button" class="btn btn-default admin-select select hyc-width" ng-change="loadReceiptCity()" ng-model="waybillInfo.receiptProvinceCode" bs-options="p.code as p.name for p in loadProvince" bs-select placeholder="---请选择---" max-length-html="个被选中" allText="选中全部" noneText="没有选中">
                            </button>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="form-group">
                            <button type="button" class="btn btn-default admin-select select hyc-width" ng-change="loadReceiptCounty()" ng-model="waybillInfo.receiptCityCode" bs-options="cityDate.code as cityDate.name for cityDate in receiptCity" bs-select placeholder="---请选择---" max-length-html="个被选中" allText="选中全部" noneText="没有选中">
                            </button>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="form-group">
                            <button type="button" class="btn btn-default admin-select select hyc-width" ng-model="waybillInfo.receiptCountyCode" bs-options="countyDate.code as countyDate.name for countyDate in receiptCounty" bs-select placeholder="---请选择---">
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-1 text-right top7">运单号</div>
            <div class="col-md-5">
                <div class="form-group">
                    <input type="text" class="form-control hyc-color" ng-model="waybillInfo.waybillCode" placeholder="运单号">
                </div>
            </div>
            <div class="col-md-1 text-right top7">调度日期</div>
            <div class="col-md-5">
                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <input type="text" class="form-control hyc-color" ng-model="waybillInfo.beginDateTime" placeholder="开始时间" bs-datepicker date-format="yyyy-MM-dd">
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <input type="text" class="form-control hyc-color" ng-model="waybillInfo.endDateTime" placeholder="结束时间" bs-datepicker date-format="yyyy-MM-dd">
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-6 text-right top7">
                &nbsp;
            </div>
            <div class="col-md-6">
                <div class="form-group text-right">
                    <div class="btn btn-default btn-sm btn-warning" ng-click="loadData('query')">查询</div>&nbsp;&nbsp;&nbsp;
                    <div class="btn btn-default btn-sm" ng-click="clearQuery()">重置</div>
                </div>
            </div>
        </div>
        <div class="hyc-overflow-y">
            <table class="table table-bordered table-hover" style="width: 2000px;">
                <tr>
                    <!--<th class="text-center">选择</th>-->
                    <th class="text-center">运单状态</th>
                    <th class="text-center">运单号</th>
                    <th class="text-center">价格</th>
                    <th class="text-center">车架号</th>
                    <th class="text-center">承运商</th>
                    <th class="text-center">起运地</th>
                    <th class="text-left">起运地详细地址</th>
                    <th class="text-center">目的地</th>
                    <th class="text-left">目的地详细地址</th>
                    <th class="text-center">调度时间</th>
                    <th class="text-center">车型列表</th>
                    <th class="text-center">起运时间</th>
                    <th class="text-center">计划到达时间</th>
                    <th class="text-center">提车人</th>
                    <th class="text-center">板车司机</th>
                    <th class="text-center">交车人</th>
                    <th class="text-center hyc-table-td-width">&nbsp;</th>
                    <th class="text-center hyc-lock-tr">操作</th>
                </tr>
                <tr ng-repeat="waybill in wayBillList track by $index" repeat-finish="repeatFinish()">
                    <!--<td class="text-center">-->
                        <!--<input type="checkbox" class="checkbox hyc-inner-block" ng-model="waybill.active" value="{{waybill.id}}"/>-->
                    <!--</td>-->
                    <td class="text-center">
                        {{waybill.statusText}}
                    </td>
                    <td class="text-center">
                        <a href="javascript:;" ui-sref="veneer-waybill-detail({id:waybill.id})">{{waybill.waybillCode}}</a>
                    </td>
                    <td class="text-center">
                        &yen;{{waybill.cost | number: 2}}
                    </td>
                    <td class="text-center">
                        <p class="margin0" ng-repeat="waybillDetail in waybill.waybillDetailVos track by $index">
                            {{waybillDetail.vin}}
                        </p>
                    </td>
                    <td class="text-center">
                        {{waybill.carrier}}
                    </td>
                    <td>
                        {{waybill.departCityName==''? waybill.departProvinceName: waybill.departCityName}}{{waybill.departCountyName}}
                    </td>
                    <td>
                        {{waybill.departAddr}}
                    </td>
                    <td>
                        {{waybill.receiptCityName==''? waybill.receiptProvinceName: waybill.receiptCityName}}{{waybill.receiptCountyName}}
                    </td>
                    <td>
                        {{waybill.receiptAddr}}
                    </td>
                    <td class="text-center">
                        {{waybill.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}
                    </td>
                    <td>
                        <p class="margin0" ng-repeat="waybillDetail in waybill.waybillDetailVos track by $index">
                            {{waybillDetail.brandName}}-{{waybillDetail.vehicleName}}
                        </p>
                    </td>
                    <td class="text-center">
                        {{waybill.shipmentDate | date: 'yyyy-MM-dd'}}
                    </td>
                    <td class="text-center">
                        {{waybill.arriveDate | date: 'yyyy-MM-dd'}}
                    </td>
                    <td class="text-center">
                        <div ng-repeat="wayBillContact in waybill.wayBillContacts track by $index">
                            <div ng-if="wayBillContact.type == 20">
                                {{wayBillContact.contact}}
                            </div>
                        </div>
                    </td>
                    <td class="text-center">
                        <div ng-repeat="wayBillContact in waybill.wayBillContacts track by $index">
                            <div ng-if="wayBillContact.type == 10">
                                {{wayBillContact.contact}}
                            </div>
                        </div>
                    </td>
                    <td class="text-center">
                        <div ng-repeat="wayBillContact in waybill.wayBillContacts track by $index">
                            <div ng-if="wayBillContact.type == 30">
                                {{wayBillContact.contact}}
                            </div>
                        </div>
                    </td>
                    <td class="hyc-table-td-width">&nbsp;</td>
                    <td class="text-center hyc-lock-tr" name="waybillList">
                        <div ng-if="waybill.status == 80">
                            <a href="javascript:;" ng-click="dealAuditModel(waybill.id)">交车审核</a>
                        </div>
                        <div ng-if="waybill.status != 80">
                            <a href="javascript:;" style="text-decoration: none;">暂无操作</a>
                        </div>
                    </td>
                </tr>
                <tr ng-if="wayBillList.length <= 0">
                    <td colspan="18">
                        <div class="hyc-color text-center">暂无运单数据</div>
                    </td>
                </tr>
            </table>
        </div>
        <div ng-include="pageIncludeUrl" ng-if="wayBillList.length > 0"></div>
    </div>
    <div class="panel-footer"></div>
</div>